<template>
  <div>
    <el-row type="flex" justify="space-between" style="margin-bottom: 15px">
      <el-col>
        <slot name="search"></slot>
      </el-col>
      <el-col :span="2" style="text-align: right">
        <el-button
          type="success"
          icon="el-icon-edit"
          size="small"
          @click="addClick('创建')"
        >
          {{ addText + addTitle }}
        </el-button>
      </el-col>
    </el-row>
  </div>
</template>

<script>
export default {
  name: 'HeadAdd',
  props: ['addText', 'addTitle'],
  data () {
    return {}
  },
  methods: {
    addClick (text) {
      this.$emit('addClick', text)
    }
  }
}
</script>

<style scoped lang="less"></style>
